# "1.点击“编辑”按钮，标签类型“手机端首页商品”，标签名称“1F商品”。
# 2.点击“保存标签信息按钮”，保存成功。"
import time
from public.action import *
from public.testData import *
from public.tools import*
from public.business import *
testCase31='DBshop031_编辑特定商品标签'
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','商品标签','特定商品标签')
firefox.find_elements_by_link_text('编辑')[0].click()
firefox.find_element_by_xpath('//option[text()="手机端首页商品"]').click()#选择手机端首页
firefox.find_element_by_id('tag_name').clear()
firefox.find_element_by_id('tag_name').send_keys('1F商品')
firefox.find_element_by_xpath('//button[contains(text(),"保存标签信息")]').click()#dianji baocun
try:
    firefox.find_element_by_xpath('//td[text()="手机端首页商品"]')
    writeLog('%s 测试通过'%testCase31)
except:
    writeLog('%s 测试不通过'%testCase31)
    getPhoto(firefox)
firefox.quit()
